//
//  BottomView.m
//  MPlayer
//
//  Created by 王俊 on 15/12/15.
//  Copyright © 2015年 王俊. All rights reserved.
//

#import "BottomView.h"
#import "defines.h"
#import "masonry.h"

@interface BottomView()
@property(nonatomic,strong) UIView  *backgroundView;

@end



@implementation BottomView
- (instancetype)init
{
    if (self = [super init]) {
        self.backgroundColor = [UIColor clearColor];
        _backgroundView = [[UIView alloc]init];
        _backgroundView.backgroundColor = [UIColor blackColor];
        _backgroundView.alpha = 0.3;
        _favouritButton = [[UIButton alloc]init];
        _nextButton = [[UIButton alloc]init];
        [_favouritButton setImage:[UIImage imageNamed:@"love"] forState:UIControlStateNormal];
        [_favouritButton setImage:[UIImage imageNamed:@"love_h"] forState:UIControlStateHighlighted];
        [_nextButton setImage:[UIImage imageNamed:@"next"] forState:UIControlStateNormal];
        
        [self addSubview:_backgroundView];
        [self addSubview:_favouritButton];
        [self addSubview:_nextButton];
        [_backgroundView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self);
        }];
        [_favouritButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(40, 40));
            make.centerY.equalTo(self);
            make.centerX.equalTo(self).offset(-SCREENWIDTH/5);
        }];
        [_nextButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(23, 14));
            make.centerY.equalTo(self);
            make.centerX.equalTo(self).offset(SCREENWIDTH/5);
        }];
    }
    return self;
}

@end
